xend: Tear down domain if device hotplug fails during startup
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 24 May 2007 13:05:58 +0000 (14:05 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 24 May 2007 13:05:58 +0000 (14:05 +0100)
commit1c77b7cb9f97eeb025af6d38753b3917e026c4ee
treec25e0720b41f9168857c4e08a6935838cf292b28
parent565f279e0732f15734ee8cf25a393bbf42a80072
xend: Tear down domain if device hotplug fails during startup

If creating an unmanaged guest (eg xm create), if device hotplug fails
during the startup of the guest, then the guest will be torn down
again. If creating and starting a managed guest (eg xm new && xm
start), then if device hotplug fails, the still born guest gets left
in 'paused' state. This confuses users no end, who go an unpause and
then get all upset when it shortly crashes (due to lack of disk or
network devices).

The attached patch fixes XenDomain.py's domain_start() method so that
if waitForDevices() fails, then the entire domain is torn down. This
is the same approach used in xm create.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/python/xen/xend/XendDomain.py